﻿e
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html>
<head>
<title>${tag.title}</title>
<style>
   #left  {float:left;width:70%;}
   #right {float:right;width:28%;}
</style>
<script type="text/javascript" src="dwr/interface/LinkManager.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/util.js"></script>
</head>
<body marginheight="0">
<div id="left">
<h1>${tag.title}(${tag.hot}次访问)&nbsp;&nbsp;<a
	href="editRootTag.html?id=${tag.tagId}">完善简介</a></h1>
<div class=indent>
<table border="0">
	<tr>
		<td width="200" rowspan="2"><a href="${tag.mainURL}"
			target="_blank" title="${tag.mainURL}"><img src="${tag.icon}"
			width="150px" style="border:0px;" /></a></td>
		<td width="300" rowspan="2"><a href="${tag.mainURL}"
			target="_blank">${tag.mainURL}</a></td>
		<td width="50" height="50" bgcolor="#FFCC66" align="center"><span
			id="diggCount_${tag.tagId}" style="font-size:24px;">${tag.diggCount}</span></td>
	</tr>
	<tr>
		<td align="center"><span id="diggStatus_${tag.tagId}"> <c:set
			var="isSaved" value="false" /> <c:if test="${loginFans.fansId==-1}">
			<a href="javascript:digg(${tag.tagId})"
				style="font-size:20px;text-decoration: none;">顶！</a>
		</c:if> <c:if test="${loginFans.fansId!=-1}">
			<c:forEach items="${tag.diggSet}" var="d">
				<c:if test="${d.fans.fansId==loginFans.fansId}">
					<c:set var="isSaved" value="true" />
				</c:if>
			</c:forEach>
			<c:if test="${isSaved==false}">
				<a href="javascript:digg(${tag.tagId})"
					style="font-size:20px;text-decoration: none;">顶！</a>
			</c:if>
			<c:if test="${isSaved==true}">
谢谢!
</c:if>
		</c:if> </span></td>
	</tr>
</table>
<c:if test="${not empty tag.lastModifyFans}">
	<a href="user/${tag.lastModifyFans.name}">${tag.lastModifyFans.nickName}</a>&nbsp;修改于&nbsp;${tag.lastModifyDate}<br />
</c:if> &nbsp;&nbsp;${tag.intro}</div>
<h2>相关连接：</h2>
<div class=indent><a
	href="http://translate.google.com/translate?hl=zh-CN&amp;sl=en&amp;u=http://www.openfans.net/viewTag.html?id=${tag.tagId}">Google翻译(英译中)</a>
&nbsp; <span id="spanLinks"> <c:forEach items="${tag.linkList}"
	var="link">
	<a href="${link.url}" style="Margin-Left:5px;">${link.title}</a>
</c:forEach> </span><br>
<c:if test="${sessionScope.loginFans.fansId>0}">
标题:<input type="text" id="linkTitle" size=20>url:<input
		type="text" id="linkUrl" size=30>
	<button type="button"
		onclick='LinkManager.addLink(addLink,$("tag.tagId").value,$("linkUrl").value,$("linkTitle").value);'>增加连接</button>
	<script type='text/javascript'>
    var addLink = function(data)
    {
     if (data=="ok"){
	      var a=document.createElement("A");
	      a.href=$("linkUrl").value;
	      a.innerHTML=$("linkTitle").value;
	      a.style.marginLeft="5px";
	      $("spanLinks").appendChild(a);
      }
      else{
      	alert("格式有误.");
      }
    }

  </script>
</c:if></div>

<h2>相关标签：</h2>
<div class=indent><c:forEach items="${tag.tagRelations}"
	var="tagRelation">
	<a href="viewTag/${tagRelation.rtag.tagId}">${tagRelation.rtag.title}</a>&nbsp;
</c:forEach>

<form action="addTagRelation.html" method="post"><INPUT
	type="hidden" name="id" value="${tag.tagId}" />
<p>您可以给此软件增加标签，方便将来搜索 <INPUT type="text" name="rtagTitle"> <input
	type="submit" name="add" value="增加">
</form>
</div>

<a name="remark"></a>
<h2>相关评价：<%@  include file="/include/remarkStatus.jsp"%></h2>
<div id="remarks" class="indent"></div>
</div>
<script type='text/javascript'>
	    $$("remarks").innerHTML="载入中...";
       var xmlhttp = getHttpRequest();
		xmlhttp.open("post","listRootTagRemark.ajax?id=${tag.tagId}",false);
		xmlhttp.send("");
       $$("remarks").innerHTML=xmlhttp.responseText;
	// $("#remarks").html("载入中...");
	//$("#remarks").load("listRootTagRemark.ajax",{id:${tag.tagId}});
</script>


<div id="right">

<p>
<h2>相关文章(${tag.articleCount}篇)：<a
	href="editArticle.html?tagId=${tag.tagId}">我要发表文章</a></h2>
<div class=indent><c:forEach items="${tag.articles}" var="article">
	<span class="smallLink">•<a
		href="viewArticle/${article.articleId}">${article.title}</a></span>
	<br>
</c:forEach></div>

<p><h2><a href="listTagFeedItem.html?id=${tag.tagId}">相关动向：</a>&nbsp;&nbsp;<a href="newFeed.html?tag=${tag.title}">增加相关Feed</a></h2>


<h2>对此软件的用户反馈：</h2>
<div class=indent>
<form action="judgeRootTag.html" method="post"><INPUT
	type="hidden" id="tagId" name="id" value="${tag.tagId}" /></form>

<p>以下用户熟练掌握：
<p><c:forEach items="${used}" var="useStatus">
	<a href="user/${useStatus.fans.name}">${useStatus.fans.nickName}</a>&nbsp;
</c:forEach>
<p>以下用户正在使用：
<p><c:forEach items="${using}" var="useStatus">
	<a href="user/${useStatus.fans.name}">${useStatus.fans.nickName}</a>&nbsp;
</c:forEach>
<p>以下用户准备使用：
<p><c:forEach items="${prepare}" var="useStatus">
	<a href="user/${useStatus.fans.name}">${useStatus.fans.nickName}</a>&nbsp;
</c:forEach> <br>
<c:if test="${loginFans.fansId!=-1}">
	<p>您 <a href="judgeRootTag.html?id=${tag.tagId}&status=used">熟练掌握</a>&nbsp;
	<a href="judgeRootTag.html?id=${tag.tagId}&status=using">正在使用</a>&nbsp;
	<a href="judgeRootTag.html?id=${tag.tagId}&status=prepare">准备使用</a>&nbsp;
	此软件
</c:if>
</div>
</div>
</body>
</html>
